<template>
    <div>

        <!--名片-->
        <div class="bgfff pt15 pl15 pb15 disflex jsbet mb10">
            <div class="disflex">
                <img :src="logo" alt="" class="w59 h59 bradius50p mr10">
                <div>
                    <p class="c38 fs18 fbold pt10 pb12">{{username}}</p>
                    <p class="ca8 fs12" @click="toEditMyCard">查看编辑个人名片</p>
                </div>
            </div>

            <div class="pt15" @click="toCardCase">
                <div class="disflex h30 bra_left_15 bg_line_blue cfff fs12 pl14 pr15 lh30 align-cen">
                    <img src="https://one-stand.oss-cn-shanghai.aliyuncs.com/yimai_photos/user/cardlist.png" alt="" class="w24 h24">
                    <span class="pl7">名片夹</span>
                </div>
            </div>

        </div>


        <!--订单-->
        <div class="bgfff fs12 c78">
            <div class="lh40 pl16 pr16 disflex jsbet" @click="page_tap('orderLists',1)">
                <span class="fs16 c38 fbold">我的订单</span>
                <div>
                    <span class="ca8 pr11">查看全部订单</span>
                    <img src="https://one-stand.oss-cn-shanghai.aliyuncs.com/yimai_photos/user/right.png" alt="" class="w10 h10">
                </div>
            </div>

            <div class="disflex jsbet pl33 pr27 mb10 fs12 c78 pt10 pb15 textc bgfff">

                <div class="textc" @click="page_tap('orderLists',1)">
                    <img src="https://one-stand.oss-cn-shanghai.aliyuncs.com/yimai_photos/user/pay.png" alt="" class="w30 h30">
                    <p class="pt5">待付款</p>
                </div>
                <div @click="page_tap('orderLists',2)">
                    <img src="https://one-stand.oss-cn-shanghai.aliyuncs.com/yimai_photos/user/daifahuo.png" alt="" class="w30 h30">
                    <p class="pt5">待发货</p>
                </div>
                <div @click="page_tap('orderLists',3)">
                    <img src="https://one-stand.oss-cn-shanghai.aliyuncs.com/yimai_photos/user/daishouhuo.png" alt="" class="w30 h30">
                    <p class="pt5">待收货</p>
                </div>
                <div @click="page_tap('orderLists',4)">
                    <img src="https://one-stand.oss-cn-shanghai.aliyuncs.com/yimai_photos/user/payed.png" alt="" class="w30 h30">
                    <p class="pt5">已完成</p>
                </div>
                <div @click="page_tap('orderLists',5)">
                    <img src="https://one-stand.oss-cn-shanghai.aliyuncs.com/yimai_photos/user/refund.png" alt="" class="w30 h30">
                    <p class="pt5">退款/售后</p>
                </div>
            </div>

        </div>


        <div class="bgfff fs12 c78">
            <div class="lh40 pl16 pr16 disflex jsbet">
                <span class="fs16 c38 fbold">我的服务</span>
            </div>

            <div class="disflex pl33 pr27 mb10 fs12 c78 pt10 pb10 bgfff textc">

                <div class="textc mr17" @click="page_tap('shopCart')">
                    <img src="https://one-stand.oss-cn-shanghai.aliyuncs.com/yimai_photos/user/cart.png" alt="" class="w30 h30">
                    <p class="pt5">购物车</p>
                </div>
                <div class="mr17" @click="page_tap('msg')">
                    <img src="https://one-stand.oss-cn-shanghai.aliyuncs.com/yimai_photos/user/msg_blue.png" alt="" class="w30 h30">
                    <p class="pt5">我的消息</p>
                </div>
                <div class="mr17" @click="page_tap('collect')">
                    <img src="https://one-stand.oss-cn-shanghai.aliyuncs.com/yimai_photos/user/star.png" alt="" class="w30 h30">
                    <p class="pt5">我的收藏</p>
                </div>
                <div class="mr17" @click="page_tap('address')">
                    <img src="https://one-stand.oss-cn-shanghai.aliyuncs.com/yimai_photos/user/addr.png" alt="" class="w30 h30">
                    <p class="pt5">我的地址</p>
                </div>
            </div>

        </div>

    </div>
</template>

<script>

    export default {
        name: '',
        components: {},
        data() {
            return{
                username:'' ,
                logo:'',
            }
        },
        mounted() {
            this.username = wx.getStorageSync('USERNAME') || '' ;
            this.logo = wx.getStorageSync('avatarUrl') || '' ;
            if(!this.username){
                wx.showToast({
                    title: '请登录',
                    duration: 2000,
                    icon: 'none'
                });
                setTimeout(function () {
                    var url = '../cardCase/main';
                    wx.redirectTo({url: url});
                },1000)
            }
            wx.setNavigationBarTitle({
                title: '个人中心'
            });
        },
        methods: {
            page_tap(url,status){
                if(status){
                    wx.navigateTo({url:'../'+url+'/main?status='+status})
                }else{
                    wx.navigateTo({url:'../'+url+'/main'})
                }
            },
            toCardCase(){//名片夹
                wx.redirectTo({url:'../cardCase/main'})

            },
            toEditMyCard(){//编辑自己的名片
                wx.navigateTo({url:'../editCard/main?type=edit'})
            }
        }
    }
</script>

<style>

</style>





































